package com.lagou.java.controller;

import com.lagou.java.pojo.Account;
import com.lagou.java.service.IAccountService;
import com.lagou.java.service.impl.AccountServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/account")
public class AccountController {

    @Autowired
    private IAccountService accountService ;

    @RequestMapping("queryAll")
    @ResponseBody
    public List<Account> queryAll () throws Exception {
        return accountService.queryAccountList();
    }
}
